//---------------------------------------------------------------------
//  This file is part of the Background Motion solution.
// 
//  Copyright (C) Mindscape (TM).  All rights reserved.
//  http://www.mindscape.co.nz
// 
//  THIS CODE AND INFORMATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY
//  KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
//  IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
//  PARTICULAR PURPOSE.
//---------------------------------------------------------------------

using Mindscape.BackgroundMotion.Model;
using Mindscape.BackgroundMotion.Website.Infrastructure;

namespace Mindscape.BackgroundMotion.Website.Controllers
{
  public interface IMembershipController : IController
  {
    /// <summary>
    /// Gets a <see ref="Member"/>.
    /// </summary>
    /// <param name="id">The unique identifier of the Member.</param>
    Member GetMember(int id);

    /// <summary>
    /// Gets the contributions which have been approved by the selected Member.
    /// </summary>
    /// <param name="member">The member.</param>
    /// <param name="pageNumber">The page number, used with the paging infrastructure.</param>
    SearchResult GetApprovedContributions(Member member, int pageNumber);

    /// <summary>
    /// Gets the unapproved contributions.
    /// </summary>
    /// <param name="member">The member to get the unapproved contributions from.</param>
    SearchResult GetUnapprovedContributions(Member member);

    /// <summary>
    /// Authenticates the specified email address.
    /// </summary>
    /// <param name="emailAddress">The email address.</param>
    /// <param name="password">The password.</param>
    /// <param name="rememberMe">if set to <c>true</c> [remember me].</param>
    void Authenticate(string emailAddress, string password, bool rememberMe);

    /// <summary>
    /// Logout out the user session
    /// </summary>
    void Logout();

    /// <summary>
    /// Creates a new <see ref="Member"/> account.
    /// </summary>
    void CreateAccount(Member member);

    /// <summary>
    /// Submits feedback from a member or anonymous user
    /// </summary>
    /// <param name="feedback">The feedback text to submit.</param>
    void SubmitFeedback(string feedback);
  }
}